{"ast":null,"code":"import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nconst adapters = {\n  http: httpAdapter,\n  xhr: xhrAdapter\n};\nexport default {\n  getAdapter: nameOrAdapter => {\n    if (utils.isString(nameOrAdapter)) {\n      const adapter = adapters[nameOrAdapter];\n      if (!nameOrAdapter) {\n        throw Error(utils.hasOwnProp(nameOrAdapter) ? `Adapter '${nameOrAdapter}' is not available in the build` : `Can not resolve adapter '${nameOrAdapter}'`);\n      }\n      return adapter;\n    }\n    if (!utils.isFunction(nameOrAdapter)) {\n      throw new TypeError('adapter is not a function');\n    }\n    return nameOrAdapter;\n  },\n  adapters\n};","map":{"version":3,"names":["utils","httpAdapter","xhrAdapter","adapters","http","xhr","getAdapter","nameOrAdapter","isString","adapter","Error","hasOwnProp","isFunction","TypeError"],"sources":["/data/messenger.client/node_modules/axios/lib/adapters/index.js"],"sourcesContent":["import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\n\nconst adapters = {\n  http: httpAdapter,\n  xhr: xhrAdapter\n}\n\nexport default {\n  getAdapter: (nameOrAdapter) => {\n    if(utils.isString(nameOrAdapter)){\n      const adapter = adapters[nameOrAdapter];\n\n      if (!nameOrAdapter) {\n        throw Error(\n          utils.hasOwnProp(nameOrAdapter) ?\n            `Adapter '${nameOrAdapter}' is not available in the build` :\n            `Can not resolve adapter '${nameOrAdapter}'`\n        );\n      }\n\n      return adapter\n    }\n\n    if (!utils.isFunction(nameOrAdapter)) {\n      throw new TypeError('adapter is not a function');\n    }\n\n    return nameOrAdapter;\n  },\n  adapters\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,aAAa;AAC/B,OAAOC,WAAW,MAAM,WAAW;AACnC,OAAOC,UAAU,MAAM,UAAU;AAEjC,MAAMC,QAAQ,GAAG;EACfC,IAAI,EAAEH,WAAW;EACjBI,GAAG,EAAEH;AACP,CAAC;AAED,eAAe;EACbI,UAAU,EAAGC,aAAa,IAAK;IAC7B,IAAGP,KAAK,CAACQ,QAAQ,CAACD,aAAa,CAAC,EAAC;MAC/B,MAAME,OAAO,GAAGN,QAAQ,CAACI,aAAa,CAAC;MAEvC,IAAI,CAACA,aAAa,EAAE;QAClB,MAAMG,KAAK,CACTV,KAAK,CAACW,UAAU,CAACJ,aAAa,CAAC,GAC5B,YAAWA,aAAc,iCAAgC,GACzD,4BAA2BA,aAAc,GAAE,CAC/C;MACH;MAEA,OAAOE,OAAO;IAChB;IAEA,IAAI,CAACT,KAAK,CAACY,UAAU,CAACL,aAAa,CAAC,EAAE;MACpC,MAAM,IAAIM,SAAS,CAAC,2BAA2B,CAAC;IAClD;IAEA,OAAON,aAAa;EACtB,CAAC;EACDJ;AACF,CAAC"},"metadata":{},"sourceType":"module"}